home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / Issue61 / Clinic / HintEg4U.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  2000-06-28  |  856 b   |  47 lines

  1. unit HintEg4U;
  2.  
  3. interface
  4.  
  5. uses
  6.   SysUtils, Windows, Messages, Classes, Graphics, Controls, Forms, Dialogs,
  7.   StdCtrls, ComCtrls, ExtCtrls;
  8.  
  9. type
  10.   TForm1 = class(TForm)
  11.     Edit1: TEdit;
  12.     Button1: TButton;
  13.     CheckBox1: TCheckBox;
  14.     Label1: TLabel;
  15.     Memo1: TMemo;
  16.     RadioButton1: TRadioButton;
  17.     Panel1: TPanel;
  18.   private
  19.     { Private declarations }
  20.   public
  21.     function ExecuteAction(Action: TBasicAction): Boolean; override;
  22.   end;
  23.  
  24. var
  25.   Form1: TForm1;
  26.  
  27. implementation
  28.  
  29. uses
  30.   StdActns;
  31.  
  32. {$R *.DFM}
  33.  
  34. function TForm1.ExecuteAction(Action: TBasicAction): Boolean;
  35. begin
  36.   if Action is THintAction then
  37.   begin
  38.     Result := True;
  39.     { Write current component hint on panel }
  40.     Panel1.Caption := THintAction(Action).Hint
  41.   end
  42.   else
  43.     Result := inherited ExecuteAction(Action)
  44. end;
  45.  
  46. end.
  47.